package cn.sciento.farm.devicemanager.api.jsonrpc;

import cn.sciento.farm.devicemanager.dao.entity.DevInjectFertilizer;
import cn.sciento.farm.devicemanager.dao.entity.DevWaterFertilizer;
import cn.sciento.farm.devicemanager.dao.model.FertilizerConfig;
import cn.sciento.farm.devicemanager.dao.model.ResponseMessage;
import cn.sciento.farm.devicemanager.dao.model.fertilizer.InjectFertilizerControl;
import cn.sciento.farm.devicemanager.service.InjectFertilizerService;
import com.googlecode.jsonrpc4j.JsonRpcMethod;
import com.googlecode.jsonrpc4j.JsonRpcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 注入式水肥机
 */
@JsonRpcService(value = "rpc/hardware.fertilizer.inject")
public interface InjectFertilizerJsonApi {

    ResponseMessage create(DevInjectFertilizer waterFertilizer);

    ResponseMessage update(DevInjectFertilizer waterFertilizer);

    ResponseMessage get(Long id);

    ResponseMessage delete(Long id);

    @JsonRpcMethod("get_area")
    ResponseMessage getByAreaId(Integer areaId);

    ResponseMessage control(InjectFertilizerControl injectFertilizerControl);

}
